/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvOptions;
}}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

foil
{{
    type            actuatorLineSource;
    active          on;

    actuatorLineSourceCoeffs
    {{
        fieldNames          (U);
        selectionMode       cellSet;    // cellSet, points, cellZone
        cellSet             foil;       // cellSet name
        freeStreamVelocity  (1 0 0);
        nElements           {n_elements};
        writePerf           true;
        writeElementPerf    true;
        endEffects          off;

        elementGeometry // Will be interpolated linearly per nElements
        ( // point spanDir chordLength chordRefDir chordMount pitch
            ((0.0 0.0 -{semispan}) (0 0 1) (0.10) (-1 0 0) (0.25) ({alpha_deg}))
            ((0.0 0.0 {semispan}) (0 0 1) (0.10) (-1 0 0) (0.25) ({alpha_deg}))
        );

        elementProfiles (profile0); // Will be distributed evenly

        profileData
        {{
            profile0
            {{
                Re          9e4;
                data
                ( // alpha C_l C_d
                    (-90 -1.45 0.21)
                    (-18 -1.45 0.21)
                    (-16 -1.3 0.165)
                    (-14 -1.1 0.125)
                    (-12 -0.95 0.092)
                    (-10 -0.8 0.07)
                    (-8 -0.64 0.05)
                    (-6 -0.5 0.04)
                    (-4 -0.32 0.028)
                    (-2 -0.18 0.022)
                    (0 0.0 0.02)
                    (2 0.18 0.022)
                    (4 0.32 0.028)
                    (6 0.5 0.04)
                    (8 0.64 0.05)
                    (10 0.8 0.07)
                    (12 0.95 0.092)
                    (14 1.1 0.125)
                    (16 1.3 0.165)
                    (18 1.45 0.21)
                    (90 1.45 0.21)
                );
            }}
        }}
    }}
}}

// ************************************************************************* //
